home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / rdf / nsIRDFResource.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  219 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIRDFResource.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIRDFResource_h__
  6. #define __gen_nsIRDFResource_h__
  7.  
  8.  
  9. #ifndef __gen_nsrootidl_h__
  10. #include "nsrootidl.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIRDFNode_h__
  14. #include "nsIRDFNode.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsIRDFResource */
  23. #define NS_IRDFRESOURCE_IID_STR "fb9686a7-719a-49dc-9107-10dea5739341"
  24.  
  25. #define NS_IRDFRESOURCE_IID \
  26.   {0xfb9686a7, 0x719a, 0x49dc, \
  27.     { 0x91, 0x07, 0x10, 0xde, 0xa5, 0x73, 0x93, 0x41 }}
  28.  
  29. /**
  30.  * An nsIRDFResource is an object that has unique identity in the 
  31.  * RDF data model. The object's identity is determined by its URI.
  32.  */
  33. class NS_NO_VTABLE nsIRDFResource : public nsIRDFNode {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRDFRESOURCE_IID)
  37.  
  38.   /**
  39.      * The single-byte string value of the resource.
  40.      * @note THIS IS OBSOLETE. C++ should use GetValueConst and script
  41.      *       should use .valueUTF8
  42.      */
  43.   /* readonly attribute string Value; */
  44.   NS_IMETHOD GetValue(char * *aValue) = 0;
  45.  
  46.   /**
  47.      * The UTF-8 URI of the resource.
  48.      */
  49.   /* readonly attribute AUTF8String ValueUTF8; */
  50.   NS_IMETHOD GetValueUTF8(nsACString & aValueUTF8) = 0;
  51.  
  52.   /**
  53.      * An unscriptable version used to avoid a string copy. Meant
  54.      * for use as a performance optimization. The string is encoded
  55.      * in UTF-8.
  56.      */
  57.   /* [noscript] void GetValueConst ([shared] out string aConstValue); */
  58.   NS_IMETHOD GetValueConst(const char **aConstValue) = 0;
  59.  
  60.   /**
  61.      * This method is called by the nsIRDFService after constructing
  62.      * a resource object to initialize it's URI. You would not normally
  63.      * call this method directly
  64.      */
  65.   /* void Init (in string uri); */
  66.   NS_IMETHOD Init(const char *uri) = 0;
  67.  
  68.   /**
  69.      * Determine if the resource has the given URI.
  70.      */
  71.   /* boolean EqualsString (in string aURI); */
  72.   NS_IMETHOD EqualsString(const char *aURI, PRBool *_retval) = 0;
  73.  
  74.   /**
  75.      * Retrieve the "delegate" object for this resource. A resource
  76.      * may have several delegate objects, each of whose lifetimes is
  77.      * bound to the life of the resource object.
  78.      *
  79.      * This method will return the delegate for the given key after
  80.      * QueryInterface()-ing it to the requested IID.
  81.      *
  82.      * If no delegate exists for the specified key, this method will
  83.      * attempt to create one using the component manager. Specifically,
  84.      * it will combine aKey with the resource's URI scheme to produce
  85.      * a ContractID as follows:
  86.      *
  87.      *   component:/rdf/delegate-factory/[key]/[scheme]
  88.      *
  89.      * This ContractID will be used to locate a factory using the
  90.      * FindFactory() method of nsIComponentManager. If the nsIFactory
  91.      * exists, it will be used to create a "delegate factory"; that
  92.      * is, an object that supports nsIRDFDelegateFactory. The delegate
  93.      * factory will be used to construct the delegate object.
  94.      */
  95.   /* void GetDelegate (in string aKey, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */
  96.   NS_IMETHOD GetDelegate(const char *aKey, const nsIID & aIID, void * *aResult) = 0;
  97.  
  98.   /**
  99.      * Force a delegate to be "unbound" from the resource.
  100.      *
  101.      * Normally, a delegate object's lifetime will be identical to
  102.      * that of the resource to which it is bound; this method allows a
  103.      * delegate to unlink itself from an RDF resource prematurely.
  104.      */
  105.   /* void ReleaseDelegate (in string aKey); */
  106.   NS_IMETHOD ReleaseDelegate(const char *aKey) = 0;
  107.  
  108. };
  109.  
  110. /* Use this macro when declaring classes that implement this interface. */
  111. #define NS_DECL_NSIRDFRESOURCE \
  112.   NS_IMETHOD GetValue(char * *aValue); \
  113.   NS_IMETHOD GetValueUTF8(nsACString & aValueUTF8); \
  114.   NS_IMETHOD GetValueConst(const char **aConstValue); \
  115.   NS_IMETHOD Init(const char *uri); \
  116.   NS_IMETHOD EqualsString(const char *aURI, PRBool *_retval); \
  117.   NS_IMETHOD GetDelegate(const char *aKey, const nsIID & aIID, void * *aResult); \
  118.   NS_IMETHOD ReleaseDelegate(const char *aKey); 
  119.  
  120. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  121. #define NS_FORWARD_NSIRDFRESOURCE(_to) \
  122.   NS_IMETHOD GetValue(char * *aValue) { return _to GetValue(aValue); } \
  123.   NS_IMETHOD GetValueUTF8(nsACString & aValueUTF8) { return _to GetValueUTF8(aValueUTF8); } \
  124.   NS_IMETHOD GetValueConst(const char **aConstValue) { return _to GetValueConst(aConstValue); } \
  125.   NS_IMETHOD Init(const char *uri) { return _to Init(uri); } \
  126.   NS_IMETHOD EqualsString(const char *aURI, PRBool *_retval) { return _to EqualsString(aURI, _retval); } \
  127.   NS_IMETHOD GetDelegate(const char *aKey, const nsIID & aIID, void * *aResult) { return _to GetDelegate(aKey, aIID, aResult); } \
  128.   NS_IMETHOD ReleaseDelegate(const char *aKey) { return _to ReleaseDelegate(aKey); } 
  129.  
  130. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  131. #define NS_FORWARD_SAFE_NSIRDFRESOURCE(_to) \
  132.   NS_IMETHOD GetValue(char * *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
  133.   NS_IMETHOD GetValueUTF8(nsACString & aValueUTF8) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValueUTF8(aValueUTF8); } \
  134.   NS_IMETHOD GetValueConst(const char **aConstValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValueConst(aConstValue); } \
  135.   NS_IMETHOD Init(const char *uri) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(uri); } \
  136.   NS_IMETHOD EqualsString(const char *aURI, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EqualsString(aURI, _retval); } \
  137.   NS_IMETHOD GetDelegate(const char *aKey, const nsIID & aIID, void * *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDelegate(aKey, aIID, aResult); } \
  138.   NS_IMETHOD ReleaseDelegate(const char *aKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReleaseDelegate(aKey); } 
  139.  
  140. #if 0
  141. /* Use the code below as a template for the implementation class for this interface. */
  142.  
  143. /* Header file */
  144. class nsRDFResource : public nsIRDFResource
  145. {
  146. public:
  147.   NS_DECL_ISUPPORTS
  148.   NS_DECL_NSIRDFRESOURCE
  149.  
  150.   nsRDFResource();
  151.  
  152. private:
  153.   ~nsRDFResource();
  154.  
  155. protected:
  156.   /* additional members */
  157. };
  158.  
  159. /* Implementation file */
  160. NS_IMPL_ISUPPORTS1(nsRDFResource, nsIRDFResource)
  161.  
  162. nsRDFResource::nsRDFResource()
  163. {
  164.   /* member initializers and constructor code */
  165. }
  166.  
  167. nsRDFResource::~nsRDFResource()
  168. {
  169.   /* destructor code */
  170. }
  171.  
  172. /* readonly attribute string Value; */
  173. NS_IMETHODIMP nsRDFResource::GetValue(char * *aValue)
  174. {
  175.     return NS_ERROR_NOT_IMPLEMENTED;
  176. }
  177.  
  178. /* readonly attribute AUTF8String ValueUTF8; */
  179. NS_IMETHODIMP nsRDFResource::GetValueUTF8(nsACString & aValueUTF8)
  180. {
  181.     return NS_ERROR_NOT_IMPLEMENTED;
  182. }
  183.  
  184. /* [noscript] void GetValueConst ([shared] out string aConstValue); */
  185. NS_IMETHODIMP nsRDFResource::GetValueConst(const char **aConstValue)
  186. {
  187.     return NS_ERROR_NOT_IMPLEMENTED;
  188. }
  189.  
  190. /* void Init (in string uri); */
  191. NS_IMETHODIMP nsRDFResource::Init(const char *uri)
  192. {
  193.     return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195.  
  196. /* boolean EqualsString (in string aURI); */
  197. NS_IMETHODIMP nsRDFResource::EqualsString(const char *aURI, PRBool *_retval)
  198. {
  199.     return NS_ERROR_NOT_IMPLEMENTED;
  200. }
  201.  
  202. /* void GetDelegate (in string aKey, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */
  203. NS_IMETHODIMP nsRDFResource::GetDelegate(const char *aKey, const nsIID & aIID, void * *aResult)
  204. {
  205.     return NS_ERROR_NOT_IMPLEMENTED;
  206. }
  207.  
  208. /* void ReleaseDelegate (in string aKey); */
  209. NS_IMETHODIMP nsRDFResource::ReleaseDelegate(const char *aKey)
  210. {
  211.     return NS_ERROR_NOT_IMPLEMENTED;
  212. }
  213.  
  214. /* End of implementation class template. */
  215. #endif
  216.  
  217.  
  218. #endif /* __gen_nsIRDFResource_h__ */
  219.